# Cz Cranelift 后端构建脚本

.PHONY: all build test clean install

all: build

build:
	cargo build --release

test:
	cargo test

clean:
	cargo clean

install:
	cargo build --release
	@echo "Library built at: target/release/"
	@echo ""
	@echo "To use in czc, add to build.zig:"
	@echo "  exe.addLibraryPath(.{ .path = \"../cz-cranelift/target/release\" });"
	@echo "  exe.linkSystemLibrary(\"cz_cranelift\");"

bench:
	cargo bench

doc:
	cargo doc --open

check:
	cargo check
	cargo clippy

format:
	cargo fmt
